package com.mes.device.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.mes.device.mapper.DeviceRepairMapper;
import com.mes.device.domain.DeviceRepair;
import com.mes.device.service.IDeviceRepairService;

/**
 * 设备报修Service业务层处理
 * 
 * @author itflash
 * @date 2025-02-27
 */
@Service
public class DeviceRepairServiceImpl implements IDeviceRepairService 
{
    @Autowired
    private DeviceRepairMapper deviceRepairMapper;

    /**
     * 查询设备报修
     * 
     * @param id 设备报修主键
     * @return 设备报修
     */
    @Override
    public DeviceRepair selectDeviceRepairById(Long id)
    {
        return deviceRepairMapper.selectDeviceRepairById(id);
    }

    /**
     * 查询设备报修列表
     * 
     * @param deviceRepair 设备报修
     * @return 设备报修
     */
    @Override
    public List<DeviceRepair> selectDeviceRepairList(DeviceRepair deviceRepair)
    {
        return deviceRepairMapper.selectDeviceRepairList(deviceRepair);
    }

    /**
     * 新增设备报修
     * 
     * @param deviceRepair 设备报修
     * @return 结果
     */
    @Override
    public int insertDeviceRepair(DeviceRepair deviceRepair)
    {
        return deviceRepairMapper.insertDeviceRepair(deviceRepair);
    }

    /**
     * 修改设备报修
     * 
     * @param deviceRepair 设备报修
     * @return 结果
     */
    @Override
    public int updateDeviceRepair(DeviceRepair deviceRepair)
    {
        return deviceRepairMapper.updateDeviceRepair(deviceRepair);
    }

    /**
     * 批量删除设备报修
     * 
     * @param ids 需要删除的设备报修主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRepairByIds(Long[] ids)
    {
        return deviceRepairMapper.deleteDeviceRepairByIds(ids);
    }

    /**
     * 删除设备报修信息
     * 
     * @param id 设备报修主键
     * @return 结果
     */
    @Override
    public int deleteDeviceRepairById(Long id)
    {
        return deviceRepairMapper.deleteDeviceRepairById(id);
    }
}
